package com.mew.slots.core.game.sgj.room.bouns;

import com.mew.slots.core.game.sgj.message.SgjBounsPlayResponseMessage;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


@Data
@ToString(callSuper = true)
@NoArgsConstructor
public class FruitMaryGame 
{

	private static final Logger logger = LoggerFactory.getLogger(FruitMaryGame.class);

	static final int s0[]= {0,0,0,20,500}; //几连
	static final int s1[]= {20,200,70,100,5,0,50,0,10,0,0}; //分数
	//0香蕉 //1西瓜//2芒果//3葡萄//4菠萝//5铃铛//6樱桃//7Bar//8橙子//9贝壳 //10scatter
	static final int tab[]= {-1,0,6,1,3,4,-1,1,0,8,6,2,-1,0,4,8,2,3,-1,1,4,6,2,3};
	final static int _EXIT = -1;
	
	public static SgjBounsPlayResponseMessage roundMary(Integer num, int type, long bet)
	{
	    //返回数据
		SgjBounsPlayResponseMessage mstep = new SgjBounsPlayResponseMessage();

		//转
        FruitMarryRand r = new FruitMarryRand(2);
		MarryMsgs res = r.getMarryRes(num);

		int[] center = res.getCenter();//中间数组
		int icon = res.icon;//外圈
        mstep.center = center;
        mstep.icon = icon;  //外圈

		if(res.type >0) //idx为0就是退出  //中几个   倍数
		{
			int mult = 0;
			mult += s1[res.icon];
			mult += s0[res.type];//几连
			mstep.mult = mult;//几倍
			mstep.winGold = mult*bet*9;//几倍
		}

		return mstep;
	}

}
